#include <cstdlib>

double mysqrt(double d)
{
	if (d < 0)
	{
		return -1;
	}
	double e = 1e-15;
	double x = 0;
	double y = d / 2;
	while (abs(x - y) > e)
	{
		x = y;
		y = (x + d / x) / 2;
	}
	return x;
}

int main()
{
	double r = mysqrt(1225);
	return 0;
}